<template>
  <div>
    <el-menu :default-active="activeIndex"
             class="el-menu-header"
             mode="horizontal"
             @select="handleSelect">
      <el-menu-item index="1">学习中心</el-menu-item>
      <el-menu-item index="2">消息中心</el-menu-item>
      <el-menu-item index="3">用户管理</el-menu-item>
      <el-menu-item index="4">后台管理</el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  name: "CommonHead",
  data() {
    return {
      activeIndex: "1",
      activeIndex2: "1"
    };
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    }
  }
};

</script>


<style scoped>
.el-menu-header {
  background: white;
}
</style>